<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/5/24 0024
 * Time: 11:16
 */

namespace app\wap\controller;


use think\Db;

class Remind extends Vip
{
    //todo 智能选币
    public function IntellectSelectCoin(){
        return $this->DbData(1);
    }

    //todo 牛熊仓位
    public function CattlePosition(){      	
        return $this->DbData(2);
    }

    //todo 数据库获取数据
    private function DbData($type){
        $page = $this->page($this->data);
        $map = ['model' =>$type];
        $list = Db::name('message')
            ->where($map)
            ->order('create_time desc')
            ->limit($page['page'],$page['limit'])
            ->select();
        if(!$list)return $this->returnError($this->NoData);
        return $this->returnSuccess($list);
    }
}